package com.vip.xchat.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;

@Data
@ToString
public class Xchat implements Serializable {

    @TableField(value = "id")
    private String id;

    /**
     * 发送人 ID
     */
    @TableField(value = "user_id")
    private String userId;

    /**
     * 聊天内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 会话 id
     */
    @TableField(value = "session_id")
    private String sessionId;

    /**
     * 聊天类型: 文本 / 图片
     */
    @TableField(value = "chat_type")
    private String chatType;

    /**
     * 创建时间，插入数据时自动填充
     */
    @TableField(value = "created_time")
    private String createdTime;

    /**
     * 删除状态：插入数据时自动填充
     */
    @TableField(value = "delete_status")
    @TableLogic
    private boolean deleteStatus;

    /**
     * 判断是否为己方
     */
    @TableField(exist = false)
    private boolean isMe;

    /**
     * 判断是否为己方
     */
    @TableField(exist = false)
    private String userName;

    /**
     * 用户头像
     */
    @TableField(exist = false)
    private String userCover;

}
